package GUI;

import java.awt.Rectangle;

import javax.swing.JButton;

import Client_logic.CustomerContactEmployee;

/**
 * This the main class for client contacts.
 * @author matan
 * @author ido
 * @author sharon
 * @author michael
 *
 */
public class ClientContactsFORM extends ClientAbstractFORM
{
	private static final long serialVersionUID = -6308876243781812668L;
	private JButton addCustomerButton = null;
	private JButton updateCustomerButton = null;
	private CustomerContactEmployee customercontactemployee  = null;
	
	
	/**
	 * This is the default constructor
	 */
	public ClientContactsFORM() 
	{
		super();
		initialize();	
	}
	
	/**
	 * This method initializes CustomersServiceDepartmentForm
	 */
	
	private void initialize() 
	{
		customercontactemployee = new CustomerContactEmployee();
		this.setSize(500, 500);
		this.setLayout(null);
		this.add(getAddCustomerButton(),null);
		this.add(getUpdateCustomerButton(),null);
	}
	
	private JButton getAddCustomerButton() 
	{
		if (addCustomerButton == null) 
		{
			addCustomerButton = new JButton();
			addCustomerButton.setBounds(new Rectangle(20, 20, 172, 29));
			addCustomerButton.setText("Add Customer");
			addCustomerButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{			
					customercontactemployee.addCustomer();
				}
			});
		}
		return addCustomerButton;
	}
	
	/**
	 * This method initializes updateProductButton
	 */
	private JButton getUpdateCustomerButton() 
	{
		if (updateCustomerButton == null) 
		{
			updateCustomerButton = new JButton();
			updateCustomerButton.setBounds(new Rectangle(20, 50, 172, 29));
			updateCustomerButton.setText("Update Customer");
			updateCustomerButton.addActionListener(new java.awt.event.ActionListener() 
			{
				public void actionPerformed(java.awt.event.ActionEvent e) 
				{			
					customercontactemployee.UpdateCustomer();
				}
			});
		}
		return updateCustomerButton;
	}
	
	
}
